from django.urls import path
# 导入当前模块的views
from basicweb.views import faculty as faculty_views
from basicweb.views import major as major_views

urlpatterns = [
    # ========== 院系管理 ============
    path("faculty/", faculty_views.index, name="faculty"),  # 展示页面
    path('faculty/list/', faculty_views.list_values, name="list_faculty"),  # 获取所有的院系数据
    path('faculty/add/', faculty_views.add_value, name="add_faculty"),  # 添加院系信息
    path('faculty/edit/', faculty_views.edit_value, name="edit_faculty"),  # 修改院系信息
    path('faculty/del/', faculty_views.del_value, name="del_faculty"),  # 删除院系信息

    # ============ 专业管理 ============
    path('major/', major_views.index, name="major"),  # 展示专业管理的页面
    path('major/list/', major_views.list_views, name="list_major"),  # 获取专业管理的数据--Ajax
    path('major/add/', major_views.add_value, name="add_major"),  # 添加专业
    path('major/edit/', major_views.edit_value, name="edit_major"),  # 修改专业信息
    path('major/del/', major_views.del_value, name="del_major"),  # 删除专业信息
    path('major/query/faculty/', major_views.get_major_by_faculty, name="faculty_major"), # 某一个院系下的专业
]
